/******************************************************************************

 @file data_sender.h

 @brief Data Sender Module Header for TI 15.4-Stack Sensor Example

 *****************************************************************************/

#ifndef DATA_SENDER_H
#define DATA_SENDER_H

#include "api_mac.h"
#include "smsgs.h"

#ifdef __cplusplus
extern "C"
{
#endif

/******************************************************************************
 Function Prototypes
 *****************************************************************************/

/*!
 * @brief       Initialize the sensor send timeout clock.
 */
extern void DataSender_initializeSensorSendTimeoutClock(void);

/*!
 * @brief       Set the sensor send timeout clock.
 */
extern void DataSender_setSensorSendTimeoutClock(uint32_t sensorSendTimeout);

/*!
 * @brief       Build and send sensor data message.
 */
extern bool DataSender_sendSensorMessage(ApiMac_sAddr_t *pDstAddr, Smsgs_sensorMsg_t *pMsg);

/*!
 * @brief       Build and send config response message.
 */
extern bool DataSender_sendConfigRsp(ApiMac_sAddr_t *pDstAddr, Smsgs_configRspMsg_t *pMsg);

/*!
 * @brief       Send LED identify request to collector.
 */
extern void DataSender_sendIdentifyLedRequest(ApiMac_sAddr_t *pDstAddr);

/*!
 * @brief       Send device type response.
 */
extern void DataSender_sendDeviceTypeResponse(ApiMac_sAddr_t *pDstAddr);

/*!
 * @brief       Send reboot response to collector.
 *
 * @param       pDstAddr - destination address (usually collector)
 * @param       status   - reboot status (0 = success)
 */
extern void DataSender_sendRebootRsp(ApiMac_sAddr_t *pDstAddr, uint8_t status);

#ifdef __cplusplus
}
#endif

#endif /* DATA_SENDER_H */
